<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_WARNING",false);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>【xxx】后台管理</title>
    <link rel="stylesheet" href=" http://localhost/ly/shop/APP/admin/Tpl/Goods/css/add.css">
    <script type='text/javascript' src='http://localhost/ly/HDPHP/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
    <link href="http://localhost/ly/HDPHP/hdphp/Extend/Org/hdui/css/hdui.css" rel="stylesheet" media="screen"><script src="http://localhost/ly/HDPHP/hdphp/Extend/Org/hdui/js/hdui.js"></script>
    <script type="text/javascript" src="http://localhost/ly/shop/APP/admin/Tpl/Goods/js/js.js"></script>
</head>
<body>
    <div id="admin">                     
        <div id="right">
            <div class="M-articless">
                <div class="top_box">
                    <h3>商品编辑</h3>
                </div>
                <div class="art-lisi">
                    <!-- <div class="forMsg">操作成功信息</div> -->
                    <form action="<?php echo U('edit');?>" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="gid" value="<?php echo $field['gid'];?>">
                        <div class="tab">
                            <ul class="tab_menu">
                                <li lab="base">
                                    <a class="action">基本设置</a>
                                </li>
                                <li lab="body">
                                    <a href="#">商品介绍</a>
                                </li>
                                <li lab="pics">
                                    <a href="#">内容页展示图</a>
                                </li>
                                <li lab="seo">
                                    <a href="#">SEO</a>
                                </li>
                            </ul>
                            <div class="tab_content">
                                <div id="base" class="content action">
                                    <table class="table2">
                                        <tr>
                                            <td width="100">商品名称</td>
                                            <td>
                                                <input type="text" name="gname" value="<?php echo $field['gname'];?>" class="w500"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="100">推荐</td>
                                            <td>
                                                <label><input type="checkbox" name="flag[]" value="推荐"/> 推荐</label>
                                                <label><input type="checkbox" name="flag[]" value="推荐"/> 置顶</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="100">商品栏目</td>
                                            <td>
                                                <select name="cid" class="category" >
                                                    <option value="0">==选择栏目==</option>
                                                    <?php $hd["list"]["n"]["total"]=0;if(isset($Category) && !empty($Category)):$_id_n=0;$_index_n=0;$lastn=min(1000,count($Category));
$hd["list"]["n"]["first"]=true;
$hd["list"]["n"]["last"]=false;
$_total_n=ceil($lastn/1);$hd["list"]["n"]["total"]=$_total_n;
$_data_n = array_slice($Category,0,$lastn);
if(count($_data_n)==0):echo "";
else:
foreach($_data_n as $key=>$n):
if(($_id_n)%1==0):$_id_n++;else:$_id_n++;continue;endif;
$hd["list"]["n"]["index"]=++$_index_n;
if($_index_n>=$_total_n):$hd["list"]["n"]["last"]=true;endif;?>

                                                        <option
                                                        <?php if($field['cid']==$n['cid']){?>selected="selected"<?php }?>
                                                        value="<?php echo $n['cid'];?>"
                                                        <?php if($n['cat_type']==0){?>class="feng"<?php }?>
                                                        ><?php echo $n['html'];?><?php echo $n['cname'];?>
                                                        <?php if($n['cat_type']==0){?>(封面栏目)<?php }?>
                                                        </option>
                                                    <?php $hd["list"]["n"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="100">商品价格</td>
                                            <td>
                                                <input type="text" name="price" value="<?php echo $field['price'];?>" class="w100"/> 元
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="100">库存</td>
                                            <td>
                                                <input type="text" name="stock" value="<?php echo $field['stock'];?>" class="w100" value="0"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="100">商品货号</td>
                                            <td>
                                                <input type="text" name="goods_sn" value="<?php echo $field['goods_sn'];?>" class="w100"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>产品图片</td>
                                            <td>
                                                <input type="file" name="pic"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" class="attr">商品属性</td>
                                        </tr>

                                        <tr>

                                            <td>产地</td>
                                            <td>
                                                <input type="text" name="pic"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" class="sta">商品规格</td>
                                        </tr>
                                        <tr>
                                            <td>颜色</td>
                                            <td>
                                                <input type="text" name="pic"/>
                                            </td>
                                        </tr>
                                    </table>
                                    <div class="attribute">
                                    </div>
                                </div>
                                <div id="body" class="content">
                                    <table class="table2">
                                        <tr>
                                            <td width="80">详细介绍</td>
                                            <td>
                                                <script type="text/javascript" charset="utf-8" src="http://localhost/ly/HDPHP/hdphp/Extend/Org/Editor/Ueditor/ueditor.config.js"></script><script type="text/javascript" charset="utf-8" src="http://localhost/ly/HDPHP/hdphp/Extend/Org/Editor/Ueditor/ueditor.all.min.js"></script><script type="text/javascript">UEDITOR_HOME_URL="http://localhost/ly/HDPHP/hdphp/Extend/Org/Editor/Ueditor/"</script><script id="hd_body" name="body" type="text/plain"></script>
    <script type='text/javascript'>
        var ue = UE.getEditor('hd_body',{
        imageUrl:'http://localhost/ly/shop/admin.php/Goods&m=ueditor_upload&water=0&uploadsize=2000000&maximagewidth=false&maximageheight=false'//处理上传脚本
        ,zIndex : 0
        ,autoClearinitialContent:false
        ,initialFrameWidth:"100%" //宽度1000
        ,initialFrameHeight:"300" //宽度1000
        ,autoHeightEnabled:false //是否自动长高,默认true
        ,autoFloatEnabled:false //是否保持toolbar的位置不动,默认true
        ,maximumWords:2000 //允许的最大字符数
        ,initialContent:'<?php echo $field['body'];?>' //初始化编辑器的内容 也可以通过textarea/script给值
        ,readonly : false //编辑器初始化结束后,编辑区域是否是只读的，默认是false
        ,wordCount:true //是否开启字数统计
        
    });
    </script>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">商家服务</td>
                                            <td>
                                                <textarea class="w600 h180" name="service"><?php echo $field['service'];?>  
                                                </textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="100">查看次数</td>
                                            <td>
                                                <input type="text" name="click" class="w300" value="<?php echo $field['click'];?>"/>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div id="pics" class="content">
                                    <table class="table2">
                                        <tr>
                                            <td width="20">
                                                <a href="javascript:" onclick="addImg(this);">[+]</a>
                                            </td>
                                            <td width="320">
                                                图片描述 <input type="test" name="goods_pic_alt[]" class="w200" value="<?php echo $field['description'];?>"/>
                                            </td>
                                            <td>
                                                <input type="file" name="goods_pic[]"/>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div id="seo" class="content">
                                    <table class="table2">
                                        <tr>
                                            <td width="100">SEO关键字</td>
                                            <td>
                                                <input type="text" value="<?php echo $field['keyworkds'];?>" name="keyworkds" class="w500"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">SEO描述</td>
                                            <td>
                                                <textarea class="w500 h150" name="description">
                                                    <?php echo $field['description'];?>
                                                </textarea>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <div class="empty15"></div>
                        <div>
                            <input type="submit" value="提交" class="btn"/>
                        </div>
                    </form>
                </div>
            </div>
        </div>       
    </div>
</body>
</html>